<div class=" wrap" id="search" style="position:fixed;left:0;top:0;z-index:999999;height:100%;width:100%;background:#EEF1F8;display:none;">
	<form method="get" action="{:U('Index/index')}">
 	<div class="top">
 		<i class="fa fa-angle-left fa-2x top_l"style="margin-right:10px;" id="searchback"></i>
 		<div class="weui_search_bar" id="search_bar" style="border-bottom: 1px solid #1ba468;padding-left:2%; width:85%">
			<i class="fa fa-search fa-lg" style=" color:#fff; margin-top:7px;"></i>
		  <input type="search" class="weui_search_input" name="searchkey" id="search_input" placeholder="搜索" required/style=" color:#fff; ">
		</div>
 	</div>
 	<div class="mhss">
		<a href="javascript:;" id="nicknamea" onclick="selectclass(this,'#nickname')">姓名</a>
		<a href="javascript:;" id="addressa" onclick="selectclass(this,'#address')">地址</a>
		<a href="javascript:;" id="mobilea" onclick="selectclass(this,'#mobile')">电话</a>
		<a href="javascript:;" id="qqa" onclick="selectclass(this,'#qq')">Q  Q</a>
		<a href="javascript:;" id="csa" onclick="selectclass(this,'#cs')">出售</a>
		<a href="javascript:;" id="qga" onclick="selectclass(this,'#qg')">求购</a>
		<a href="javascript:;" id="companya" onclick="selectclass(this,'#company')">单位</a>
		<!--
		<a href="javascript:;" id="provincea" onclick="selectclass(this,'#province')">省份</a>
		<a href="javascript:;" id="citya" onclick="selectclass(this,'#city')">城市</a>
		-->
 	</div>

	<input name="nickname" type="hidden" id="nickname" value="<if condition="$_GET['nickname'] == 1">1</if>"/>
	<input name="address" type="hidden" id="address" value="<if condition="$_GET['address'] == 1">1</if>"/>
	<input name="mobile" type="hidden" id="mobile" value="<if condition="$_GET['mobile'] == 1">1</if>"/>
	<input name="qq" type="hidden" id="qq" value="<if condition="$_GET['qq'] == 1">1</if>"/>
	<input name="cs" type="hidden" id="cs" value="<if condition="$_GET['cs'] == 1">1</if>"/>
	<input name="qg" type="hidden" id="qg" value="<if condition="$_GET['qg'] == 1">1</if>"/>
	<input name="company" type="hidden" id="company" value="<if condition="$_GET['company'] == 1">1</if>"/>
	<!--
	<input name="province" type="hidden" id="province" value="<if condition="$_GET['province'] == 1">1</if>"/>
	<input name="city" type="hidden" id="city" value="<if condition="$_GET['city'] == 1">1</if>"/>
	-->
 	<button class="btn" type="submit">确认搜索</button>
	</form>
</div>

<div class=" wrap" id="searchss" style="position:fixed;left:0;top:0;z-index:999999;height:100%;width:100%;background:#EEF1F8;display:none;">
 	<div class="top">
 		<i class="fa fa-angle-left fa-2x top_l"style="margin-right:10px;" id="selectcityback"></i>
 		<div class="weui_search_bar" id="search_bar" style="/*border-bottom: 1px solid #1ba468;*/padding-left:2%; width:85%">
			<!--
		  <i class="fa fa-search fa-lg" style=" color:#fff; margin-top:7px;"></i>
		  <input type="search" class="weui_search_input" name="searchkey" id="search_input" placeholder="搜索" required/style=" color:#fff; ">
		  -->
		</div>
		<!--<i class="fa fa-phone fa-lg top_r" id="telephone"></i>-->
 	</div>
 	<div class="mhss">
		<a href="{$zsctest|provinceurl='全部',###}" >全部</a>
		<a href="{$zsctest|provinceurl='北京',###}" >北京</a>
		<a href="{$zsctest|provinceurl='天津',###}" >天津</a>
		<a href="{$zsctest|provinceurl='河北',###}" >河北</a>
		<a href="{$zsctest|provinceurl='山西',###}" >山西</a>
		<a href="{$zsctest|provinceurl='内蒙古',###}" >内蒙古</a>
		<a href="{$zsctest|provinceurl='辽宁',###}" >辽宁</a>
		<a href="{$zsctest|provinceurl='吉林',###}" >吉林</a>
		<a href="{$zsctest|provinceurl='黑龙江',###}" >黑龙江</a>
		<a href="{$zsctest|provinceurl='上海',###}" >上海</a>
		<a href="{$zsctest|provinceurl='江苏',###}" >江苏</a>
		<a href="{$zsctest|provinceurl='浙江',###}" >浙江</a>
		<a href="{$zsctest|provinceurl='安徽',###}" >安徽</a>
		<a href="{$zsctest|provinceurl='福建',###}" >福建</a>
		<a href="{$zsctest|provinceurl='江西',###}" >江西</a>
		<a href="{$zsctest|provinceurl='山东',###}" >山东</a>
		<a href="{$zsctest|provinceurl='河南',###}" >河南</a>
		<a href="{$zsctest|provinceurl='湖北',###}" >湖北</a>
		<a href="{$zsctest|provinceurl='湖南',###}" >湖南</a>
		<a href="{$zsctest|provinceurl='广东',###}" >广东</a>
		<a href="{$zsctest|provinceurl='广西',###}" >广西</a>
		<a href="{$zsctest|provinceurl='海南',###}" >海南</a>
		<a href="{$zsctest|provinceurl='重庆',###}" >重庆</a>
		<a href="{$zsctest|provinceurl='四川',###}" >四川</a>
		<a href="{$zsctest|provinceurl='贵州',###}" >贵州</a>
		<a href="{$zsctest|provinceurl='云南',###}" >云南</a>
		<a href="{$zsctest|provinceurl='西藏',###}" >西藏</a>
		<a href="{$zsctest|provinceurl='陕西',###}" >陕西</a>
		<a href="{$zsctest|provinceurl='甘肃',###}" >甘肃</a>
		<a href="{$zsctest|provinceurl='青海',###}" >青海</a>
		<a href="{$zsctest|provinceurl='宁夏',###}" >宁夏</a>
		<a href="{$zsctest|provinceurl='新疆',###}" >新疆</a>
		<a href="{$zsctest|provinceurl='香港',###}" >香港</a>
		<a href="{$zsctest|provinceurl='澳门',###}" >澳门</a>
		<a href="{$zsctest|provinceurl='台湾',###}" >台湾</a>
		<a href="{$zsctest|provinceurl='海外',###}" >海外</a>
 	</div>
</div>

<div class="top">
	<!--<i class="fa fa-angle-left fa-2x top_l" onclick="history.go(-1)"></i>-->
	<i class="fa top_l" id="selprovince" style="line-height:30px;"><if condition="$_SESSION['province']">
		{$_SESSION['province']}
		<else/>
		省份
		</if>
		<i class="fa fa-angle-down fa-lg"></i></i>
	<div class="weui_search_bar" id="search_bar" style="width:65%;">

		<form class="weui_search_outer">
			<div class="weui_search_inner">
				<i class="weui_icon_search"></i>
				<input type="search" class="weui_search_input" id="search_input" placeholder="搜索" required/>
				<a href="javascript:" class="weui_icon_clear" id="search_clear"></a>
			</div>
			<label for="search_input" class="weui_search_text" id="search_text">
				<i class="weui_icon_search"></i>
				<span>搜索</span>
			</label>
		</form>

		<a href="javascript:" class="weui_search_cancel" id="search_cancel">取消</a>
	</div>
	<i class="fa fa-phone fa-lg top_r" id="telephone"></i>
</div>

<script>
$(function() {
	$('#search_bar').click(function() {
		$('#search').show();
	});
	$('#footersearch').click(function() {
		$('#search').show();
	});
	$('#searchback').click(function() {
		$('#search').hide();
	});

	<if condition="$_GET['nickname'] == 1">
		$('#nicknamea').css({'background':'#f1f0dc','border':'1px solid #dcdbc9','color':'#9d8c76'});
	</if>

	<if condition="$_GET['address'] == 1">
		$('#addressa').css({'background':'#f1f0dc','border':'1px solid #dcdbc9','color':'#9d8c76'});
	</if>

	<if condition="$_GET['mobile'] == 1">
		$('#mobilea').css({'background':'#f1f0dc','border':'1px solid #dcdbc9','color':'#9d8c76'});
	</if>

	<if condition="$_GET['qq'] == 1">
		$('#qqa').css({'background':'#f1f0dc','border':'1px solid #dcdbc9','color':'#9d8c76'});
	</if>

	<if condition="$_GET['cs'] == 1">
		$('#csa').css({'background':'#f1f0dc','border':'1px solid #dcdbc9','color':'#9d8c76'});
	</if>

	<if condition="$_GET['qg'] == 1">
		$('#qga').css({'background':'#f1f0dc','border':'1px solid #dcdbc9','color':'#9d8c76'});
	</if>

	<if condition="$_GET['company'] == 1">
		$('#companya').css({'background':'#f1f0dc','border':'1px solid #dcdbc9','color':'#9d8c76'});
	</if>

	<if condition="$_GET['province'] == 1">
		$('#provincea').css({'background':'#f1f0dc','border':'1px solid #dcdbc9','color':'#9d8c76'});
	</if>

	<if condition="$_GET['city'] == 1">
		$('#citya').css({'background':'#f1f0dc','border':'1px solid #dcdbc9','color':'#9d8c76'});
	</if>

	$('#selprovince').click(function() {
			$('#searchss').show();
	});
	$('#selprovince2').click(function() {
			$('#searchss').show();
	});
	$('#selectcityback').click(function() {
			$('#searchss').hide();
	});
});

function selectclass(self,inputid) {
	v = $(inputid).val();
	if(v == 1) {
		$(inputid).val('');
		$(self).css({'background':'#fff','border':'1px solid #dde1ea','color':'#707070'});
	} else {
		$(inputid).val(1);
		$(self).css({'background':'#f1f0dc','border':'1px solid #dcdbc9','color':'#9d8c76'});
	}
}
</script>
